﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Sector7.Framework.Core;
using Sector7.Framework.Utility;

namespace Sector7.Medical.Controls
{
    /// <summary>
    /// AccountPanel.xaml 的交互逻辑
    /// </summary>
    public partial class AccountPanel : UserControl
    {
        #region Accessor
        #endregion

        #region Public functions
        /// <summary>
        /// 加载用户信息
        /// </summary>
        public void LoadAccoutInformation()
        {
            if (Senvironments.CurrentAccount != null)
            {
                lblFullName.Content = ReflectionUtil.GetPropertyValue(Senvironments.CurrentAccount, "FullName");
                lblDuty.Content = ReflectionUtil.GetPropertyValue(Senvironments.CurrentAccount, "DutyId");
                lblDept.Content = "内科二"; // ReflectionUtil.GetPropertyValue(Senvironments.CurrentAccount, "");
                lblArea.Content = "病区十七"; // ReflectionUtil.GetPropertyValue(Senvironments.CurrentAccount, "");
                //string profilePath = DirectoryUtil.GenerateDirectoryPath(@"Accounts\beckham\profile.jpg");
                //imgAvatar.Source = new BitmapImage(new Uri(profilePath));
            }
        }
        #endregion

        #region Private functions
        #endregion

        #region Structure
        public AccountPanel()
        {
            InitializeComponent();
        }
        #endregion

        #region Inner members
        #endregion
    }
}
